home *** CD-ROM | disk | FTP | other *** search
- TNyBck compenent V 1.3 10.9.2001
- Nihat Yorganci nyorganci@hotmail.com
- Please send me notes, bugs and problems.
-
-
- Export and import whole database to the text files and binary files.
- Memo and BLOB fields are also supported. TnyBck is saved Total record count in Text file when Export.
- so you can use this count as Gauge Max Value.Please examine to Demo.
-
-
- if you have calculated fields or lookupfields in dataset you must not be export this fields. See Csvmap properties.
-
- You can use this component for free in commercial or non-commercial programs
- Please send me the changes you made in source code, and do not forgret my credit!
-
-
- This compenent TPgCSV (Khashayar Sadjadi (khashi@pragena.8m.com)) And KDatabase Export pack(delphi@korzh.com) Combined.
-
-
-
- Installation:
-
- Remove Nybck component previous version.Click Component menu. Select Install Component.
- Select Nybck.pas in Unit File Name with Browse.
- Select Package file name exist your computer(*.dpk).
- or Select into new package, write a new filename in Package file name.Press ok.
- Appear package box and press install. After Save *.dpk file.
-
-
-
- Usage
- 1. Place the component of your Form or DataModule.
- 2. Set the proprties (See properties section in this readme)
- 3. Close dataset
- 4. Call Imprt or Exprt methods.
- 5. Open Dataset
-
- see Test.dpr.
-
-
- Properties:
-
- CSVMap : Mapping of BCK file(text file) and table fields. A List of field names, started bt value of
- FieldIndicator value and seprated by Seprator value.
- Ex: $Name,$Age,$BirthDate
- if you writed CSVMap and Export all records, please don't change
- CSVMap string while import all records to dataset. Othervise raised errors.
- only exported and imported fields in CsvMap string. So you don't have to Export
- calculated and lookup fields.
-
-
- Dataset :Tdataset. TDataset in Delphi forms or DataModules to link with TNyBck for Import and Export.
-
- Delimiter: Char. Seprator character.specifies the delimiter that will separate field values in
- the text files.Default '"' .
-
- FieldIndicator : Special character for identifing field names in CSVMap.
-
- Seprator : Seprator character. Offten ,
-
- SilentImport :boolean. Setting this property to True forces TNyBck to do not raise exceptions and call ImportError event
-
-
- TextFile :String. A Text file. Each record in a seperate line, seperated by CR.
- if your have blob or memo field TnyBck create a binary file (*.mem).
- example: textfile:= 'myfile.Bck', TnyBck also create myfile.mem.
-
-
- TotalRecord :integer.Read only. Get Totol record in BeforeExport and Before▌mport events.You get Total Record only this two events.
- You can use Totol Record your gauge max value.
- Events:
-
- AfterCloseTable : Fires after TNyBck closed dataset.
-
- AfterExport : Fires after export process of a dataset to a Text Files( and *.Mem files) finishes.
-
- AfterImport : Fires after import process of a Text files (and *.mem) to dataset finishes.
-
- AfterOpenTable : Fires after TNyBck opens the dataset.
-
- BeforeCloseTable : Fires before TNyBck closes the database.
-
- BeforeExport : Fires before export process starts from a Dataset to a Text files.
-
- BeforeImport : Fires before import process starts from a Text files to a Dataset.
-
- BeforeOpenTable : Fires before TNyBck opens dataset.
-
- ImportError : Firest each time an exception occures in Importing a Text to a dataset.
- You can force TNyBck to handle ignore error or abort the process.
- This event will be fired only if Silent²mport property is setted to True.
-
- ExportProgress : Fires each time a new record added to a Text files during exportin a dataset to a textFiles.
- You can Stop export progress by setting StopIt parameter to True.
-
- ImportProgress : Fires each time a new record added to a dataset during importing a text fileto a dataset.
- You can Stop import progress by setting StopIt parameter to True.
-
- OnAddRecord : Fires each time a new record added to dataset during importing a Text to a dataset.
- Exception handling:
-
- By setting SilentImport property to True, if an exception occure in Import method, TNyBck will
- not raise exception and will call ImportError event with exception message and record number.
- You can set the Response parameter to nybckIgnore or nybckAbort to make TnyBck handle the exception.
- Setting Response to nybckIgnore will make TNyBck ignore current record and it will continue Importing, but
- nybckAbort will terminate import process at the currect record.
- Default value of Response parameter is nybckIgnore.
-
- Progress monitoring:
-
- By writing event handlers for ExportProgress and ImportProgress events, you can monitor Import and/or
- Export progress during the process. You can also stop process by setting StopIt parameter to True within
- event handler.
-
- Total Record: Readonly.Total record write in text file first line(Export method).
- Total Record Reading in text file first line(Import mehthod).
- You can get Total record in BeforeExport and BeforeImport events.
-
- AutoMapping feature:
- ----------------------------------------------
- If you leave the CSVMap property blank, TPgCSV will use all Dataset
- fields to generate *.Bck file in Exprt and ▌mprt method.
-
-
-
- History:
-
- ver 1.3. (10.9.2001)
- a major bug solved in imprt method.
-
-
- ver 1.2. (8.9.2001)
- Export Method change Exprt, ▌mport Method change imprt.
- CsvMap, fieldindicator and Seprator properties added.
-
- ver 1.1 (26.1.2001)
- Some bugs solved.
-
- Test Demo Project note:
- please compile this project And Open windows
- explorer and Click test.exe.
- Because ▌f you run with Delphi and import record when Key violation
- Error raised.
- Firs time you do click export,after delete 2 or 3 record and click
- import.
- You can see Don't raise "key violation" error.
-